<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/axios.min.js"></script>
</head>
<body>
<button>批量发送请求</button>
</body>
<script>
	const btn = document.querySelector("button");
	btn.onclick = function(){
		const p1 = axios.get("http://zhangpeiyue.com/scoreList/1");
		const p2 = axios.get("http://zhangpeiyue.com/scoreList/2");
		const p3 = axios.get("http://zhangpeiyue.com/scoreList/3");
		const p4 = axios.get("http://zhangpeiyue.com/scoreList/4");
		// Promise.all([p1,p2,p3,p4]).then(value=>{
		// 	console.log(value[0].data);
        // })

        axios.all([p1,p2,p3,p4]).then(axios.spread(function(v1,v2,v3,v4){
			console.log(v4.data)
        }))
	}
</script>
</html>